const baseUrl = 'https://112.74.74.239/prod-api'   
const request = (url = '', data = {}, method = 'GET', loadding=false,header = {
'content-type':'application/json' 
})=>{
    return new Promise(async (resolve, reject) => {
		loadding && uni.showLoading()
		header.Authorization =  uni.getStorageSync('token')
		let response = await uni.request({
		       url: baseUrl + url,
		       method,
		       data,
		       header,
			   dataType: 'json',   
		 }); 
		 loadding && uni.hideLoading() 
		 resolve(response.data);//  reject(error)
    });
}
export default request
 